﻿using AutoMapper;
using Model.Entitys;
using Shop.Models.Dto.Menu;
using Shop.Models.Dto.Role;
using Shop.Models.Dto.User;

namespace Shop.WebApi.Config
{
    public class AutoMapperConfigs:Profile
    {
        public AutoMapperConfigs() 
        {
            //角色
            CreateMap<RoleAdd, Role>();
            CreateMap<RoleEdit, Role>();

            //用户
            CreateMap<UserAdd, Users>();
            CreateMap<UserEdit, Users>();

            //菜单
            CreateMap<MenuAdd, Menu>();
            CreateMap<MenuEdit, Menu>();
        }
    }
}
